/*
 * WSO2 API Manager - Admin Portal API
 * This specifies a **RESTful API** for WSO2 **API Manager** - Admin Portal.  Please see [full swagger definition](https://raw.githubusercontent.com/wso2/carbon-apimgt/v6.0.4/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher/src/main/resources/publisher-api.yaml) of the API which is written using [swagger 2.0](http://swagger.io/) specification. 
 *
 * OpenAPI spec version: v1.0
 * Contact: architecture@wso2.com
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 * Do not edit the class manually.
 */


package org.wso2.carbon.apimgt.rest.integration.tests.admin.model;

import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.wso2.carbon.apimgt.rest.integration.tests.admin.model.HeaderCondition;
import org.wso2.carbon.apimgt.rest.integration.tests.admin.model.IPCondition;
import org.wso2.carbon.apimgt.rest.integration.tests.admin.model.JWTClaimsCondition;
import org.wso2.carbon.apimgt.rest.integration.tests.admin.model.QueryParameterCondition;

/**
 * Throttling Conditions
 */
@ApiModel(description = "Throttling Conditions")
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-04-16T14:59:16.844+05:30")
public class ThrottleCondition {
  @JsonProperty("headerCondition")
  private HeaderCondition headerCondition = null;

  @JsonProperty("ipCondition")
  private IPCondition ipCondition = null;

  @JsonProperty("jwtClaimsCondition")
  private JWTClaimsCondition jwtClaimsCondition = null;

  @JsonProperty("queryParameterCondition")
  private QueryParameterCondition queryParameterCondition = null;

  @JsonProperty("type")
  private String type = null;

  @JsonProperty("invertCondition")
  private Boolean invertCondition = false;

  public ThrottleCondition headerCondition(HeaderCondition headerCondition) {
    this.headerCondition = headerCondition;
    return this;
  }

   /**
   * Get headerCondition
   * @return headerCondition
  **/
  @ApiModelProperty(value = "")
  public HeaderCondition getHeaderCondition() {
    return headerCondition;
  }

  public void setHeaderCondition(HeaderCondition headerCondition) {
    this.headerCondition = headerCondition;
  }

  public ThrottleCondition ipCondition(IPCondition ipCondition) {
    this.ipCondition = ipCondition;
    return this;
  }

   /**
   * Get ipCondition
   * @return ipCondition
  **/
  @ApiModelProperty(value = "")
  public IPCondition getIpCondition() {
    return ipCondition;
  }

  public void setIpCondition(IPCondition ipCondition) {
    this.ipCondition = ipCondition;
  }

  public ThrottleCondition jwtClaimsCondition(JWTClaimsCondition jwtClaimsCondition) {
    this.jwtClaimsCondition = jwtClaimsCondition;
    return this;
  }

   /**
   * Get jwtClaimsCondition
   * @return jwtClaimsCondition
  **/
  @ApiModelProperty(value = "")
  public JWTClaimsCondition getJwtClaimsCondition() {
    return jwtClaimsCondition;
  }

  public void setJwtClaimsCondition(JWTClaimsCondition jwtClaimsCondition) {
    this.jwtClaimsCondition = jwtClaimsCondition;
  }

  public ThrottleCondition queryParameterCondition(QueryParameterCondition queryParameterCondition) {
    this.queryParameterCondition = queryParameterCondition;
    return this;
  }

   /**
   * Get queryParameterCondition
   * @return queryParameterCondition
  **/
  @ApiModelProperty(value = "")
  public QueryParameterCondition getQueryParameterCondition() {
    return queryParameterCondition;
  }

  public void setQueryParameterCondition(QueryParameterCondition queryParameterCondition) {
    this.queryParameterCondition = queryParameterCondition;
  }

  public ThrottleCondition type(String type) {
    this.type = type;
    return this;
  }

   /**
   * Get type
   * @return type
  **/
  @ApiModelProperty(required = true, value = "")
  public String getType() {
    return type;
  }

  public void setType(String type) {
    this.type = type;
  }

  public ThrottleCondition invertCondition(Boolean invertCondition) {
    this.invertCondition = invertCondition;
    return this;
  }

   /**
   * Get invertCondition
   * @return invertCondition
  **/
  @ApiModelProperty(value = "")
  public Boolean getInvertCondition() {
    return invertCondition;
  }

  public void setInvertCondition(Boolean invertCondition) {
    this.invertCondition = invertCondition;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    ThrottleCondition throttleCondition = (ThrottleCondition) o;
    return Objects.equals(this.headerCondition, throttleCondition.headerCondition) &&
        Objects.equals(this.ipCondition, throttleCondition.ipCondition) &&
        Objects.equals(this.jwtClaimsCondition, throttleCondition.jwtClaimsCondition) &&
        Objects.equals(this.queryParameterCondition, throttleCondition.queryParameterCondition) &&
        Objects.equals(this.type, throttleCondition.type) &&
        Objects.equals(this.invertCondition, throttleCondition.invertCondition);
  }

  @Override
  public int hashCode() {
    return Objects.hash(headerCondition, ipCondition, jwtClaimsCondition, queryParameterCondition, type, invertCondition);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class ThrottleCondition {\n");
    
    sb.append("    headerCondition: ").append(toIndentedString(headerCondition)).append("\n");
    sb.append("    ipCondition: ").append(toIndentedString(ipCondition)).append("\n");
    sb.append("    jwtClaimsCondition: ").append(toIndentedString(jwtClaimsCondition)).append("\n");
    sb.append("    queryParameterCondition: ").append(toIndentedString(queryParameterCondition)).append("\n");
    sb.append("    type: ").append(toIndentedString(type)).append("\n");
    sb.append("    invertCondition: ").append(toIndentedString(invertCondition)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private String toIndentedString(java.lang.Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }
  
}

